package cn.springcloud.provider.service.impl;

import cn.springcloud.api.model.User;
import cn.springcloud.provider.service.UserService;
import cn.springcloud.provider.dao.UserDao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @Author gc
 * @Date 2019/12/9 15:07  周一
 * @Description
 */
@Service
@Transactional
public class UserServiceImpl  implements UserService {

    @Autowired
    private UserDao userDao ;

    public List<User> findAll() {
        return userDao.findAll();
    }
    public List<Map<String,Object>> findAllUser() {
        return userDao.findAllUser();
    }

    @Override
    public User findByName(String userName) {
        return userDao.findByName(userName);
    }

    public User findById(String id) {
        return userDao.findById(id);
    }
}
